Item Property

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The indexer of the dictionary. The set accessor throws an NotSupportedException stating the dictionary is read-only.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public virtual TValue this[
	TKey key
]{ get; set;}
Visual Basic (Declaration)
Public Overridable Default Property Item ( _
	key As TKey _
) As TValue
Visual C++
public:
virtual property TValue default[TKey key] {
	TValue get (TKey key);
	void set (TKey key, TValue value);
}

Parameters

key
TKey
Key to find in the dictionary.

Return Value

The value associated with the key.

Remarks

The get accessor is implemented by calling TryGetValue.

Exceptions

ExceptionCondition
System..::NotSupportedExceptionAlways thrown from the set accessor, indicating that the dictionary is read only.
System.Collections.Generic..::KeyNotFoundExceptionThrown from the get accessor if the key was not found.

See Also